#!/bin/bash
# date: 2022-07-30
# author: xxr
read -p "请输入修改后主机名：" hostname
hostnamectl set-hostname  $hostname
echo "successful"
echo "现在主机名为:$(hostname)"
bash
